<script setup>
const props = defineProps({
  title: {
    type: String,
    default: '首页'
  }
})

</script>

<template>
  <div class="area-top ">
    <div class="wrap flex flex-between flex-item-center" style="height: 100%;">
      <div class="title-box">
        <a href="/" class="home"></a>
        <div class="title">
          {{ title }}
        </div>
      </div>
      <a href="/#/about" class="right-btn">
        <span class="_phone"></span>联系我们</a>
      <!--     <slot />-->
    </div>
  </div>
</template>

<style scoped>
.area-top {
  background-color: #ffffff;
  position: relative;
  height: 50px;
  line-height: 50px;
  z-index: 4;
  border-bottom: 1px solid #e7e8e9;
  display: flex;
  justify-content: center;
  align-items: center;

}

.title-box {
  width: 400px;
  height: 100%;
  background-color: #CA0006;
  display: flex;
  align-items: center;

  .home {
    display: inline-block;
    width: 50px;
    height: 100%;
    background-image: url(https://www.chinaydfl.com/phone/images/icon_05.png);
    border-left: 1px solid rgba(255, 255, 255, .25);
    border-right: 1px solid rgba(255, 255, 255, .25);
    background-color: #CA0006;
    background-repeat: no-repeat;
    background-position: center;
    background-size: inherit;
  }

  .title {
    padding: 0 50px 0 19px;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    height: 100%;
  }
}

.area-top::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: calc((100vw - 1200px) / 2);
  height: 100%;
  background-color: #CA0006;
}

.right-btn {
  font-size: 14px;
  color: #CA0006;
  display: flex;
  height: 100%;

  ._phone {
    background-repeat: no-repeat;
    background-position: center;
    background-size: inherit;
    background-image: url(https://www.chinaydfl.com/phone/images/icon_18.png);
    width: 18px;
    height: 100%;
    margin-right: 6px;
  }
}


</style>
